home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Classic Games for OS/2 Warp
/
Classic Games for OS2 Warp (1995)(IBM).iso
/
mlgames
/
makeobj.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-07-19
|
7KB
|
191 lines
/* Rebuild gamepak folder & icons */
rc = RxFuncAdd( "SysCreateObject", "RexxUtil", "SysCreateObject" )
rc = RxFuncAdd( "SysDriveMap", "RexxUtil", "SysDriveMap" )
rc = RxFuncAdd( "SysDriveInfo", "RexxUtil", "SysDriveInfo" )
rc = RxFuncAdd( "SysFileTree", "RexxUtil", "SysFileTree" )
/* Create Magic Canvas Folder */
/* Create Icons inside folder */
Class = "WPProgram"
Loc = "<MLGAMES>"
/* App setup strings */
Dir = "\FUNPAK\MLGAMES"
IconName = "MLGAMES.ICO"
FldrName = "MLGAMES"
Setup = "ICONFILE=" || IconName || ";STARTUPDIR=" || Dir
/* get a list of all local drives */
Map = SysDriveMap( , "LOCAL" )
/* search for funpak drive & dir */
Do I=1 to Words(Map)
Drive = Strip( Word(Map, I) )
/* Check if Drive is Accessable */
If ( (SysDriveInfo(Drive) \= "" ) & ,
(Strip(Word(SysDriveInfo, 2)) \= "0") ) then Do
/* Check if MicroLearn Gamepak Dir exists */
rc = SysFileTree( Drive || Dir, "File.", "DO" )
If (File.0 == 1) then Do
/* Create This App's Folder */
DestFolder = "<" || FldrName || ">"
Class = "WPFolder"
Title = "The MicroLearn Game Pack"
Loc = "<FPFOLDER>"
Setup = "OBJECTID=" || DestFolder || ,
";ICONFILE=" || Drive || Dir || "\MLGAME0.ICO" || ,
";ICONNFILE=1," || Drive || Dir || "\MLGAME1.ICO"
Opts = "Fail"
ok = SysCreateObject( Class, Title, Loc, Setup, Opts )
/* Insure parent folder was created: */
/* Might fail because object already exists (more than 1 */
/* copy installed?) Add drive letter to Title name and OBJID */
/* and try to recreate object */
If (ok == 0) Then Do
Title = Title || " on " || Drive
DestFolder = "<" || Drive || FldrName || ">"
Setup = "OBJECTID=" || DestFolder
Opts = "Replace"
ok = SysCreateObject( Class, Title, Loc, Setup, Opts )
End
/* Add Games to the inside of the folder - the exe's should have */
/* their icons assigned already. */
If (ok == 1) then Do
/* Add "BlockBoucer" Exe */
Name = Drive || Dir || "\BB.EXE"
Class = "WPProgram"
Title = "BlockBouncer"
Loc = DestFolder
Setup = ";EXENAME=" || Name || ,
";STARTUPDIR=" || Drive || Dir
Opts = "Replace"
call SysCreateObject Class, Title, Loc, Setup, Opts
/* Add "Combo" Exe: */
Name = Drive || Dir || "\COMBO.EXE"
Class = "WPProgram"
Title = "Combo"
Loc = DestFolder
Setup = ";EXENAME=" || Name || ,
";STARTUPDIR=" || Drive || Dir
Opts = "Replace"
call SysCreateObject Class, Title, Loc, Setup, Opts
/* Add "Four Fun" Exe: */
Name = Drive || Dir || "\FOUR.EXE"
Class = "WPProgram"
Title = "Four Fun"
Loc = DestFolder
Setup = ";EXENAME=" || Name || ,
";STARTUPDIR=" || Drive || Dir
Opts = "Replace"
call SysCreateObject Class, Title, Loc, Setup, Opts
/* Add "Go-Moku" Exe: */
Name = Drive || Dir || "\GOMOKU.EXE"
Class = "WPProgram"
Title = "Go-Moku"
Loc = DestFolder
Setup = ";EXENAME=" || Name || ,
";STARTUPDIR=" || Drive || Dir
Opts = "Replace"
call SysCreateObject Class, Title, Loc, Setup, Opts
/* Add "Manta Ghiis: */
Name = Drive || Dir || "\MANTA.EXE"
Class = "WPProgram"
Title = "Manta Ghiis"
Loc = DestFolder
Setup = ";EXENAME=" || Name || ,
";STARTUPDIR=" || Drive || Dir
Opts = "Replace"
call SysCreateObject Class, Title, Loc, Setup, Opts
/* Add "Mind Sweeper" */
Name = Drive || Dir || "\SWEEPER.EXE"
Class = "WPProgram"
Title = "MindSweeper"
Loc = DestFolder
Setup = ";EXENAME=" || Name || ,
";STARTUPDIR=" || Drive || Dir
Opts = "Replace"
call SysCreateObject Class, Title, Loc, Setup, Opts
/* Add "Soko PM" */
Name = Drive || Dir || "\SOKOPM.EXE"
Class = "WPProgram"
Title = "Soko PM"
Loc = DestFolder
Setup = ";EXENAME=" || Name || ,
";STARTUPDIR=" || Drive || Dir
Opts = "Replace"
call SysCreateObject Class, Title, Loc, Setup, Opts
/* Add "Solitaire" */
Name = Drive || Dir || "\SOL.EXE"
Class = "WPProgram"
Title = "Solitaire"
Loc = DestFolder
Setup = ";EXENAME=" || Name || ,
";STARTUPDIR=" || Drive || Dir
Opts = "Replace"
call SysCreateObject Class, Title, Loc, Setup, Opts
/* Add "The Wall" */
Name = Drive || Dir || "\WALL.EXE"
Class = "WPProgram"
Title = "The Wall"
Loc = DestFolder
Setup = ";EXENAME=" || Name || ,
";STARTUPDIR=" || Drive || Dir
Opts = "Replace"
call SysCreateObject Class, Title, Loc, Setup, Opts
/* Add "Wordmaster" */
Name = Drive || Dir || "\WM.EXE"
Class = "WPProgram"
Title = "WordMaster"
Loc = DestFolder
Setup = ";EXENAME=" || Name || ,
";STARTUPDIR=" || Drive || Dir
Opts = "Replace"
call SysCreateObject Class, Title, Loc, Setup, Opts
/* Add "SokoPM Ed" */
Name = Drive || Dir || "\SOKOEDIT.EXE"
Class = "WPProgram"
Title = "SokoPM Editor"
Loc = DestFolder
Setup = ";EXENAME=" || Name || ,
";STARTUPDIR=" || Drive || Dir
Opts = "Replace"
call SysCreateObject Class, Title, Loc, Setup, Opts
/* Add "Wall Ed" */
Name = Drive || Dir || "\WALLEDIT.EXE"
Class = "WPProgram"
Title = "The Wall Editor"
Loc = DestFolder
Setup = ";EXENAME=" || Name || ,
";STARTUPDIR=" || Drive || Dir
Opts = "Replace"
call SysCreateObject Class, Title, Loc, Setup, Opts
End
End
End
End